package com.c2001.springboot.dao;

import com.c2001.springboot.controller.request.BaseRequest;
import com.c2001.springboot.controller.request.LoginRequest;
import com.c2001.springboot.domain.Admin;
import com.c2001.springboot.domain.Admin;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface AdminDao {
    List<Admin> listAdmins();

    List<Admin> listByCondition(BaseRequest baseRequest);

    void addAdmin(Admin admin);

    Admin getById(Integer id);

    void update(Admin admin);

    void deleteById(Integer id);

    Admin getByUsernameAndPassword(LoginRequest loginRequest);
}
